package com.bjpowernode.adapters.impl;

import com.bjpowernode.adapters.IWorkerAdapter;
import com.bjpowernode.worker.ICooker;
import com.bjpowernode.worker.IProgrammer;

public class WorkAdapter implements IWorkerAdapter {

	@Override
	public String work(Object worker) {
		String workContent = "";
		if(worker instanceof ICooker){
			workContent=((ICooker)worker).cook();
		}
		if(worker instanceof IProgrammer){
			workContent=((IProgrammer)worker).program();
		}
		return workContent;
	}

}
